package com.example.studentportrait.controller.frontend.teacher;

import com.example.studentportrait.domain.ResponseResult;
import com.example.studentportrait.domain.dto.GraduationDestinationDto;
import com.example.studentportrait.service.GraduationDestinationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/destination")
public class GraduationDestinationController {

    @Autowired
    private GraduationDestinationService graduationDestinationService;

    /**
     * 获取毕业去向
     * @param page
     * @param size
     * @param graduationDestinationDto
     * @return
     */
    @GetMapping("/destinationList")
    public ResponseResult destinationList(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, @RequestBody GraduationDestinationDto graduationDestinationDto) {
        return graduationDestinationService.graduationDestinationList(page,size,graduationDestinationDto);
    }

    /**
     * 获取所有的学生去向信息
     * @param page
     * @param size
     * @return
     */
    @GetMapping("/destinationListAll")
    public ResponseResult destinationList(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size){
        return graduationDestinationService.graduationDestinationListAll();
    }
}
